import java.io.IOException;
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.MulticastSocket;
import java.util.Date;


public class MulticastServer {

	/**
	 * @param args
	 * @throws IOException 
	 * @throws InterruptedException 
	 */
	public static void main(String[] args) throws IOException, InterruptedException {

		MulticastSocket sender = new MulticastSocket();
		
		while(true) {
			String message = "From Ivo " + new Date().toString();
			byte[] buffer = message.getBytes();
			DatagramPacket out = new DatagramPacket(buffer, buffer.length, InetAddress.getByName("224.0.0.255"), 4444);
			sender.send(out);
			Thread.sleep(1000);
		}
	}
}
